package com.usdt.system.mapper.cp;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usdt.system.domain.cp.VisitRegisterEntity;
import com.usdt.system.domain.resp.BatchVisitRespVO;
import com.usdt.system.domain.resp.VisitRegisterListRespVO;
import com.usdt.system.dto.cp.VisitRegisterListExcelDTO;

/**
 * <p>
 * 到访登记 Mapper 接口
 * </p>
 *
 * @author L
 * @since 2025-10-04
 */
@Mapper
public interface VisitRegisterMapper extends BaseMapper<VisitRegisterEntity> {

	IPage<VisitRegisterListRespVO> findPageList(
			Page page, 
			@Param("clueSource")String clueSource, 
			@Param("keyWord")String keyWord, 
			@Param("startDate")String startDate,
			@Param("endDate")String endDate, 
			@Param("customerStatus")String customerStatus, 
			@Param("userId")String userId, 
			@Param("currentDeptId")String currentDeptId, 
			@Param("currentUserId")String currentUserId
			);

	List<VisitRegisterListExcelDTO> findList(
			@Param("clueSource")String clueSource, 
			@Param("keyWord")String keyWord, 
			@Param("startDate")String startDate,
			@Param("endDate")String endDate, 
			@Param("customerStatus")String customerStatus, 
			@Param("userId")String userId, 
			@Param("currentDeptId")String currentDeptId, 
			@Param("currentUserId")String currentUserId);

	List<BatchVisitRespVO> getVisitByPhoneNumber(
			@Param("phoneNumber")String phoneNumber, 
			@Param("deptIds")List<String> deptIds);

	IPage<BatchVisitRespVO> batchVisitTransferOutPage(
			Page page, 
			@Param("sourceList")List<String> sourceList, 
			@Param("userId")String userId, 
			@Param("deptIds")List<String> deptIds,
			@Param("phoneNumber")String phoneNumber);
}
